﻿using Microsoft.Extensions.Options;

namespace 环境变量
{
    public class TestService
    {
        private readonly IOptionsSnapshot<Person> opt;

        public TestService(IOptionsSnapshot<Person> opt) {

            this.opt = opt;
        }

        public void Show()
        {
            Console.WriteLine(opt.Value.ToString());
        }

    }
}
